#pragma warning(disable:4996)
#include<stdio.h>
#include<string.h>
int main()
{
	int length;
	char mid[10]="abcdef";
	char arr[10] = "7b c";
	strncpy(mid, arr,2);
	printf("%s\n", mid);
	//拷贝不会在最后不加'\0'
	//即结果不会是"7b",而是"7bcdef";
	return 0;
}	